#ifndef WORLD_H
#define WORLD_H
#include <functional>
#include <qstringlist.h>
#include <qobject.h>
#include <qwidget.h>
#include "Def.h"

class SDK_EXPORT_API SDKCore : public QObject
{
	Q_OBJECT
	DECLARE_PRIVATE(SDKCore)
public:
	static SDKCore* instance();
	~SDKCore();
public:
	void init();
public:
	Helper* getHelper()const;
	ScriptExecutor* getScriptExecutor()const;
	Text* getText()const;
	StyleManager* getStyleManager()const;
	EarthGraticule* getEarthGraticule()const;
	ICamera* getCamera()const;
	LayerManager* getLayerManager()const;
	void asyncCaptureImage(const QString& file,std::function<void(const QString&,bool)> fn = captureImageCallback);
private:
	SDKCore();

	static void captureImageCallback(const QString& file,bool flag);
};

#endif